#include<bits/stdc++.h>
using namespace std;
int solve() {
  int n;cin>>n;
  set<int> s;
  int tmp;
  while(cin>>tmp) {
    s.insert(tmp);
  }
  cout << s.size() << endl;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
  // freopen("in.txt","r",stdin);
  // freopen("out.txt","w",stdout);
  int tc; tc = 1;
  for(int t = 1; t <= tc; t++) {
    // cout << "Case #" << t << ": "
    solve();
  }
  return 0;
}
